<template>
    <div>欢迎来到{{val}}</div>
</template>
<script setup>
  import { ref, onMounted } from 'vue';
  import emitter from '../utils/bus.js';
  const val = ref('北京');
  onMounted(()=>{
    // console.log(emitter);
    emitter.on('cut',(value) => {
       val.value = value;
    })
  })
</script>
